Modify Customer Offer

This API is used to update the details of a single Sell Plan in the system. The API Request includes only those details that require modification. Do not include any elements that are not being modifed because empty parameters override the existing values with a NULL value.

This API supports modifying the plans only of eligible sub-accounts.

HTTP URL

 

PATCH /api/v2/customer/{id}/offer/{id}/

NOTE: /offer/{id} is the catalog offering ID.

Eligibility

The Requester is eligible to request modifications on its own Sell Plans only. The Requester is not allowed to modify any other plans.

API Request

Request Structure

Parameter

Type

M/O/CM

Description

eligibleSubAccountIds

UUID

O

Array of sub account UUIDs. Specified sub account\s are the accounts that are eligible to view and manage (attach/detach) this offer as part of the self-service feature. If sent empty – None of the customer’s sub-accounts are eligible to this offer. ‘ALL’ keyword (ENUM) - All the customer’s sub-accounts are eligible to this offer.

NOTE:  Removing an existing sub account that was already attached a SIM to this offer will eliminate the ability of the sub account to detach the SIM from this offer using the self-service mode

availabilityZone

UUID

O

Array of availability zone IDs that are assigned to this plan.

Sending a populated array overrides the existing availability zones.

Sending an empty array overrides existing availability zones.

Not sending this parameter leaves all existing availability zones unchanged.

renewalIntervalDay

Numeric

O

Determines the new requested renewal day of the selected period. ENUM valid values:
  • DAILY: N/A
  • WEEKLY: 1–7
  • MONTHLY: 1–28
  • QUARTERLY: 1–90
  • SEMI_ANNUALLY: 1–180
  • ANNUALLY: 1–365
  • ONE_TIME: N/A
Can be used only if the plan is set with the SELF_DEFINED per renewalIntervalMethod attribute when the plan was created. Rejected if another renewalIntervalMethod, ENUM FIRST_DAY, PLAN_ALLOCATION, was selected.

expirationDate

Date

O

Determines the new requested expiration date per the chosen expirationType when the plan was created. Can be used only if the plan expirationType is set to FIXED. Rejected if populated with another expirationType.

expirationUnit

String

O

Determines the new requested time unit to be used for calculating the expiration date. per the chosen expirationType when the plan was created. ENUM valid values: DAY, WEEK, MONTH, YEAR. Can be used only if the selected expirationType differs from FIXED. Rejected if populated for FIXED expirationType.

expirationValue

Numeric

O

Determines the new requested time value for the selected expirationUnit parameter.

Can be used only if the selected expirationType differs from FIXED.

Rejected if populated for FIXED expirationType.

Consider population this value if the expirationUnit parameter has been changed.

API Response

Response Structure

Parameter

Type

M/O/CM

Description

errorCode

String

O

Failure code.

errorMessage

String

O

Failure message.

content

Object

O

Array of main response body object displayed when an API call was successful. For a failure, it will be empty.

pageable

Object

O

Paging information object displayed when an API call was successful. For a failure, it will be empty.

Content data objects

Element

Type

M/O/CM

Description

requestId

UUID

M

Request instance ID.

To be used by external systems to query the call (operation) status:

In progress

  • Successful
  • Failed.

Pageable data objects

Element Type M/O/CM Description
page Numeric M Page number
size Numeric M Page size. Number of requested elements per page
totalPages Numeric M Total amount of available pages per requested page size
totalElements Numeric M

Total amount of retrieved elements

Error Codes

In addition to the general success and failure codes, the following error codes are possible.

Code Message
GLOBAL_1001 Service unavailable. Please try again
CUSTOMER_1002 Customer does not exist
CUSTOMER_1012 Unknown offer ID

Examples

Request Body

Copy
{  
  "eligibleSubAccountIds": [
    "ff74dca6-8e7f-4b85-a42b-13860913b371",
    "ceb892d2-f24b-4007-bf81-999fe75cb635"
  ]
}

Response Body: Success ACK

Copy
{
  "errorCode": "",
  "errorMessage": "",
  "content": [
    {
      "requestId": "ff74dca6-8e7f-4b85-a42b-13860913b371"
    }
  ],
  "pageable": {
    "page": 0,
    "size": 10,
    "totalPages": 1,
    "totalElements": 1
  }
}

Response Body: Failure NAK

Copy
{
  "errorCode": "GLOBAL_1001",
  "errorMessage": "Service unavailable. Please try again",
  "content": "",
  "pageable": ""
}